using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Tongiao.Config;     
using Tongiao.Entity;
namespace Tongiao.ManagerBase
{
                

     public abstract class Tg_ProductsManagerBase
    {
        public Tg_ProductsManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity Insert(Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity Update(Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.Update(obj);             
        }
 
 
        public Tg_ProductsEntity Delete(Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByCategoryId (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CategoryId 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByCategoryId (Guid CategoryId )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CategoryId = CategoryId;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"CategoryId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByCreatedBy (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByCreatedBy (string CreatedBy )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedBy = CreatedBy;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByCreatedDate (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByCreatedDate (DateTime CreatedDate )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedDate = CreatedDate;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteById (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteById (Guid Id )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Id = Id;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByPackages (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Packages");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Packages 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByPackages (string Packages )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Packages = Packages;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Packages");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByPhoto (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Photo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Photo 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByPhoto (string Photo )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Photo = Photo;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Photo");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByPrice (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Price");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Price 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByPrice (double Price )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Price = Price;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Price");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByProductCode (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"ProductCode");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ProductCode 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByProductCode (string ProductCode )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductCode = ProductCode;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"ProductCode");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByProductName (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"ProductName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien ProductName 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByProductName (string ProductName )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductName = ProductName;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"ProductName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteBySpecification (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Specification");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Specification 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteBySpecification (string Specification )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Specification = Specification;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Specification");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByTitle (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Title");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Title 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByTitle (string Title )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Title = Title;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"Title");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByUpdatedBy (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByUpdatedBy (string UpdatedBy )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByUpdatedDate (Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate 
        /// </summary>
        /// <returns>Tg_ProductsEntity</returns>
        public Tg_ProductsEntity DeleteByUpdatedDate (DateTime UpdatedDate )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return (Tg_ProductsEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public Tg_ProductsEntity Select(Tg_ProductsEntity obj)
        { 
            return (Tg_ProductsEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(Tg_ProductsEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(Tg_ProductsEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new Tg_ProductsEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new Tg_ProductsEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<Tg_ProductsEntity> SelectAllLST()
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new Tg_ProductsEntity()),new Tg_ProductsEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<Tg_ProductsEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new Tg_ProductsEntity(),option),new Tg_ProductsEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByCategoryIdLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByCategoryIdLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CategoryId",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCategoryId (Guid CategoryId, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CategoryId = CategoryId;  
            return Adapter.SelectByField(obj,"CategoryId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByCategoryIdLST (Guid CategoryId )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CategoryId = CategoryId;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CategoryId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByCategoryIdLST (Guid CategoryId, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CategoryId = CategoryId;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CategoryId",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByCreatedByLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByCreatedByLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedBy",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByCreatedByLST (string CreatedBy )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByCreatedByLST (string CreatedBy, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByCreatedDateLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByCreatedDateLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedDate",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByCreatedDateLST (DateTime CreatedDate )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByCreatedDateLST (DateTime CreatedDate, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByIdLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByIdLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Id",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByIdLST (Guid Id )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Id = Id;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByIdLST (Guid Id, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Id = Id;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPackages (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Packages");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPackages (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Packages",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByPackagesLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Packages"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByPackagesLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Packages",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPackages (string Packages )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Packages = Packages;  
            return Adapter.SelectByField(obj,"Packages");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPackages (string Packages, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Packages = Packages;  
            return Adapter.SelectByField(obj,"Packages",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByPackagesLST (string Packages )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Packages = Packages;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Packages"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Packages duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByPackagesLST (string Packages, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Packages = Packages;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Packages",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Photo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Photo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByPhotoLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByPhotoLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Photo",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (string Photo )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Photo = Photo;  
            return Adapter.SelectByField(obj,"Photo");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPhoto (string Photo, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Photo = Photo;  
            return Adapter.SelectByField(obj,"Photo",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByPhotoLST (string Photo )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Photo = Photo;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Photo duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByPhotoLST (string Photo, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Photo = Photo;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Photo",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Price");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Price",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByPriceLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Price"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByPriceLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Price",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (double Price )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Price = Price;  
            return Adapter.SelectByField(obj,"Price");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByPrice (double Price, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Price = Price;  
            return Adapter.SelectByField(obj,"Price",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByPriceLST (double Price )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Price = Price;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Price"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Price duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByPriceLST (double Price, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Price = Price;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Price",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"ProductCode");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ProductCode",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByProductCodeLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductCode"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByProductCodeLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ProductCode",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (string ProductCode )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductCode = ProductCode;  
            return Adapter.SelectByField(obj,"ProductCode");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductCode (string ProductCode, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductCode = ProductCode;  
            return Adapter.SelectByField(obj,"ProductCode",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByProductCodeLST (string ProductCode )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductCode = ProductCode;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductCode"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductCode duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByProductCodeLST (string ProductCode, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductCode = ProductCode;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductCode",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductName (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"ProductName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductName (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"ProductName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByProductNameLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductName"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByProductNameLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"ProductName",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductName (string ProductName )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductName = ProductName;  
            return Adapter.SelectByField(obj,"ProductName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByProductName (string ProductName, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductName = ProductName;  
            return Adapter.SelectByField(obj,"ProductName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByProductNameLST (string ProductName )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductName = ProductName;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductName"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien ProductName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByProductNameLST (string ProductName, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.ProductName = ProductName;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"ProductName",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySpecification (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Specification");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySpecification (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Specification",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectBySpecificationLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Specification"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectBySpecificationLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Specification",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySpecification (string Specification )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Specification = Specification;  
            return Adapter.SelectByField(obj,"Specification");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectBySpecification (string Specification, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Specification = Specification;  
            return Adapter.SelectByField(obj,"Specification",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectBySpecificationLST (string Specification )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Specification = Specification;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Specification"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Specification duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectBySpecificationLST (string Specification, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Specification = Specification;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Specification",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTitle (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"Title");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTitle (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Title",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByTitleLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Title"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByTitleLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Title",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTitle (string Title )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Title = Title;  
            return Adapter.SelectByField(obj,"Title");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTitle (string Title, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Title = Title;  
            return Adapter.SelectByField(obj,"Title",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByTitleLST (string Title )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Title = Title;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Title"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Title duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByTitleLST (string Title, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.Title = Title;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Title",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByUpdatedByLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByUpdatedByLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedBy",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByUpdatedByLST (string UpdatedBy )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByUpdatedByLST (string UpdatedBy, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (Tg_ProductsEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByUpdatedDateLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectByUpdatedDateLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedDate",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByUpdatedDateLST (DateTime UpdatedDate )
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_ProductsEntity> SelectByUpdatedDateLST (DateTime UpdatedDate, SelectOptions option)
        { 
            Tg_ProductsEntity obj = new Tg_ProductsEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate",option),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectWithConditionLST (Tg_ProductsEntity obj)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new Tg_ProductsEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<Tg_ProductsEntity></returns>
        public List<Tg_ProductsEntity> SelectWithConditionLST (Tg_ProductsEntity obj,SelectOptions option)
        { 
            return  (List<Tg_ProductsEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new Tg_ProductsEntity());
        }

}
}
